package com.pension.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.pension.common.Util;
import com.pension.model.dao.MemberDao;
import com.pension.model.dto.Member;

@WebServlet("/member/deletemember.action")
public class DeleteMembersServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
		throws ServletException, IOException {

		
		String[] deleteid = req.getParameterValues("checkItem");
		for ( int i = 0; i < deleteid.length; i++) {
		
			MemberDao dao = new MemberDao();
			dao.getDeleteMember(deleteid[i]);
			
		}
		
		resp.sendRedirect("/pension/member/deleteuser.action");
		
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
		throws ServletException, IOException {
		
		req.setCharacterEncoding("utf-8");
		
		doGet(req, resp);
	}
	
}






